#include <iostream>

#define MAX_N 80000
int c[MAX_N + 5]; //前缀和数组
#define lowbit(x) (x & -x)

void add(int i, int x, int n) {
    while (i <= n) {
        c[i] += x;
        i += lowbit(i);
    }
}

int query(int i) {
    int sum = 0;
    while (i) {
        sum += c[i];
        i -= lowbit(i);
    }
    return sum;
}

int n, ind[MAX_N + 5], cnt[MAX_N + 5];
//IND存放最终求解出来的答案下标
//cnt存放每个位置有多少个小动物编号小于他

void input() {
    std::cin >> n;
    for (int i = 2; i <= n; ++i) std::cin >> cnt[i];
    for (int i = 1; i <= n; ++i) {
        add(i, 1, n); //初始化前缀和数组
    }
}

int binary_search(int n, int x) {
    int head = 1, tail = n, mid;
    while (head < tail) {
        mid = (head + tail) >> 1;
        if (query(mid) < x) head = mid + 1;
        else tail = mid;
    }
    return head;
}

void solve() {
    for (int i = n; i >= 1; --i) {
        ind[i] = binary_search(n, cnt[i] + 1);
        add(ind[i], -1, n);
    }
}

void output() {
    for (int i = 1; i <= n; ++i) {
        std::cout << ind[i] << std::endl;
    }
}

int main() {
    input();
    solve();
    output();
    return 0;
}